#include <iostream>

/*
    三种权限
        公共权限  public     类内可以访问  类外可以访问
        保护权限  protected  类内可以访问  类外不可以访问
        私有权限  private    类内可以访问  类外不可以访问
*/

class Person
{
public:
    std::string name;

protected:
    std::string car;

private:
    std::string time;

public:
    void func()
    {
        this->name = "张三";
        this->car = "1200万";
        this->time = "20分钟";
    }

    void show_info()
    {
        std::cout << "此人姓名：" << this->name << "\t车子价格：" << this->car << "\t时间：" << this->time << std::endl;
    }
};

int main(int argc, char const *argv[])
{
    
    Person person;
    person.name = "东方问天";
    // person.car = "123万"; // member "Person::car" is inaccessible
    // person.time = "10分钟"; // member "Person::time" is inaccessible

    person.show_info();
    std::cout << "##################" << std::endl;
    person.func();
    person.show_info();

    return 0;
}
